﻿@using Kunlun.BusinessLogic
@using Kunlun.Models;
@model Kunlun.ViewModels.ProductsViewModels
@{
    ViewBag.Title = @Model.Products.SeoPageName + @Model.Products.Name + @Model.Products.SeoPageName;
}
@section Head
{
 <meta name="keywords" content="@Model.Products.Seokeyword"/> 
 <meta name="description" content="@Model.Products.SeoDescription"/> 
   <script type="text/javascript">
       $(function () {
           $(".ImageLink").click(function () {

               var imageurl = $(this).attr("data-image");

               $("#viewpic").attr("src",imageurl) ;
           });

       });
    </script>
 }
 @foreach (var item in Model.Categorys)
    {
       @item.Cname
    }

 <div class="view">
 

   <img id="viewpic" src="@string.Format("{0}{1}", WebLog.ImageHttp, Model.Products.ViewPic)" />
        <div class="thumbnail">
        @foreach (var item in Model.Products.Product_pic)
        {
      
            <a href="#" class="ImageLink" data-image=@string.Format("{0}{1}", WebLog.ImageHttp, @ProductImageToThum.Square(item.ImageUrl))> <img height="50"  src="@string.Format("{0}{1}", WebLog.ImageHttp, @ProductImageToThum.Thumbnail(item.ImageUrl))" /></a>

        }   
    
   
        </div>
 </div>
 <div class="producttxt">
   产品价格：@Model.Products.Makeprice
    <br />
   产品名称 @Model.Products.Name
   <br />
 产品属性
 @foreach(var item in Model.Products.Product_propertys)
 {
    @item.Product_types.Name  @item.Value <br />
 
 }
 <div>
     产品规格<br />
     @if (Model.Products.Product_attributes != null)
     {
         foreach (var item in Model.Products.Product_attributes)
         { 
            <div>@item.Title </div>
             <div>@item.Value2 </div><br />
         }
     }
 </div>
 </div>
 <div>
 @Model.Products.Contents
 </div>
 @foreach (var item in ViewData["Interest"] as List<Product>)
 { 
    <a href="/Store/Photobook/View/@item.pid"> @item.Name</a>
    
    <a href="/Store/Photobook/View/@item.pid"><img height="50"  src="@string.Format("{0}{1}", "http://192.168.1.186", @ProductImageToThum.Thumbnail(item.ViewPic))" /></a>
 }